package top.mcwebsite.playandroid.common.network.api

import okhttp3.Cookie
import top.mcwebsite.playandroid.common.network.model.RespModel

interface NetworkService {

    fun init()

    fun <T> createApi(clazz: Class<T>): T

    fun getCookies(): List<Cookie>

    fun clearCookies()

    fun isNetworkAvailable(): Boolean

}

inline fun <reified T> NetworkService.createApi(): T {
    return createApi(T::class.java)
}
